package com.shensi.api.admin.client.station;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.station.dto.GzhNewsTemplateDto;
import com.shensi.api.admin.domian.station.dto.NonOilCategoryDto;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.page.TableDataInfo;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface NonOilCategoryClient {

    /**
     * 查询非油品分类树
     */
    @PostMapping("/nonOilCategory/getNonOilCategoryTree")
    public AjaxResult getNonOilCategoryTree(@RequestBody NonOilCategoryDto nonOilCategory);


    /**
     * 通过id查询非油品分类
     */
    @GetMapping("/nonOilCategory/queryById/{categoryId}")
    public AjaxResult queryById(@PathVariable("categoryId") Long categoryId);

    /**
     * 修改非油品分类
     */
    @PostMapping("/nonOilCategory/update")
    public AjaxResult update(@RequestBody NonOilCategoryDto nonOilCategory);


    /**
     * 删除非油品分类
     */
    @PostMapping("/nonOilCategory/delete")
    public AjaxResult delete(@RequestBody List<Long> categoryIds);


    /**
     * 新增非油品分类树
     */
    @PostMapping("/nonOilCategory/insert")
    public AjaxResult insert(@RequestBody NonOilCategoryDto nonOilCategory);

}
